We simply don't want to care about legacy OpenGL.
All supported platforms also have support for OpenGL ≥ 3.2; it would
complicate the internal code; and would force us to use legacy GL
contexts internally if the first context created by the user is a legacy
GL context, and disable creation of core-3.2 contexts after that.
We will need to fix all our code examples to use the Core 3.2 profile.
https://bugzilla.gnome.org/show_bug.cgi?id=741946
switch (priv->profile)
{
case GDK_GL_PROFILE_DEFAULT:
- case GDK_GL_PROFILE_LEGACY:
- if (major != NULL)
- *major = 1;
- break;
-
case GDK_GL_PROFILE_3_2_CORE:
if (major != NULL)
*major = 3;
switch (priv->profile)
{
case GDK_GL_PROFILE_DEFAULT:
- case GDK_GL_PROFILE_LEGACY:
- if (minor != NULL)
- *minor = 0;
- break;
-
case GDK_GL_PROFILE_3_2_CORE:
if (minor != NULL)
*minor = 2;
{
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
- g_return_val_if_fail (GDK_IS_GL_CONTEXT (context), GDK_GL_PROFILE_LEGACY);
+ g_return_val_if_fail (GDK_IS_GL_CONTEXT (context), GDK_GL_PROFILE_DEFAULT);
return priv->profile;
}
/**
* GdkGLProfile:
- * @GDK_GL_PROFILE_DEFAULT: ...
- * @GDK_GL_PROFILE_LEGACY: ...
- * @GDK_GL_PROFILE_3_2_CORE: ...
+ * @GDK_GL_PROFILE_DEFAULT: The default profile.
+ * @GDK_GL_PROFILE_3_2_CORE: Use core 3.2 GL profiles
*
- * ...
+ * The profile to be used when creating a #GdkGLContext.
+ *
+ * Since: 3.16
*/
typedef enum {
GDK_GL_PROFILE_DEFAULT,
- GDK_GL_PROFILE_LEGACY,
GDK_GL_PROFILE_3_2_CORE
} GdkGLProfile;
+/**
+ * GdkGLError:
+ * @GDK_GL_ERROR_NOT_AVAILABLE: OpenGL support is not available
+ * @GDK_GL_ERROR_UNSUPPORTED_FORMAT: The requested visual format is not supported
+ * @GDK_GL_ERROR_UNSUPPORTED_PROFILE: The requested profile is not supported
+ *
+ * Error enumeration for #GdkGLContext.
+ *
+ * Since: 3.16
+ */
typedef enum {
GDK_GL_ERROR_NOT_AVAILABLE,
GDK_GL_ERROR_UNSUPPORTED_FORMAT,
window->impl_window->gl_paint_context =
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_gl_context (window->impl_window,
TRUE,
- GDK_GL_PROFILE_3_2_CORE,
+ GDK_GL_PROFILE_DEFAULT,
NULL,
&internal_error);
- if (window->impl_window->gl_paint_context == NULL &&
- g_error_matches (internal_error, GDK_GL_ERROR,
- GDK_GL_ERROR_UNSUPPORTED_PROFILE))
- {
- g_clear_error (&internal_error);
- window->impl_window->gl_paint_context =
- GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_gl_context (window->impl_window,
- TRUE,
- GDK_GL_PROFILE_DEFAULT,
- NULL,
- &internal_error);
- }
}
if (internal_error != NULL)
profile = gdk_gl_context_get_profile (context);
share = gdk_gl_context_get_shared_context (context);
- /* GDK_GL_PROFILE_DEFAULT is currently equivalent to the LEGACY profile */
- if (profile == GDK_GL_PROFILE_DEFAULT)
- profile = GDK_GL_PROFILE_LEGACY;
-
/* we check for the presence of the GLX_ARB_create_context_profile
* extension before checking for a GLXFBConfig.
*/
display = gdk_window_get_display (window);
- /* GDK_GL_PROFILE_DEFAULT is currently equivalent to the LEGACY profile */
+ /* GDK_GL_PROFILE_DEFAULT is currently equivalent to the 3_2_CORE profile */
if (profile == GDK_GL_PROFILE_DEFAULT)
profile = GDK_GL_PROFILE_3_2_CORE;